let {Wechaty} = require('wechaty');
let on_scan = require('./module/on_scan');
let on_login = require('./module/on_login');
let on_logout = require('./module/on_logout');
let on_message = require('./module/on_message');
let on_error = require('./module/on_error');
let on_friend = require('./module/on_friend');
let on_room_join = require('./module/on_room_join');
let on_room_leave = require('./module/on_room_leave');
let on_room_topic = require('./module/on_room_topic');

Wechaty.instance({
        head: 'phantomjs'
        //profile: 'dahehe'
    }) // Singleton
    .on('scan', on_scan)
    .on('login', on_login)
    .on('logout', on_logout)
    .on('message', on_message)
    .on('error', on_error)
    .on('friend', on_friend)
    .on('room-join', on_room_join)
    .on('room-leave', on_room_leave)
    .on('room-topic', on_room_topic)
    .init();
